//
//  KJTableViewItem.m
//  KJKit
//
//  Created by Tiger on 2022/6/9.
//

#import "KJTableViewItem.h"
#import "KJTableViewCell.h"

NSString *const kKJTableViewItem_cellID = @"KJTableViewItem_cellID";


@implementation KJTableViewItem

- (instancetype)init {
    self = [super init];
    if (self) {
        _cellHeight = 49;
        _allowSelection = YES;
        _cellSelectionStyle = UITableViewCellSelectionStyleDefault;
    }
    return self;
}

- (void)setAllowSelection:(BOOL)allowSelection {
    _allowSelection = allowSelection;
    if (_allowSelection) {
        _cellSelectionStyle = UITableViewCellSelectionStyleDefault;
    } else {
        _cellSelectionStyle = UITableViewCellSelectionStyleNone;
    }
}

#pragma mark - --- 用于识别对象类,继承自定义时必须重写 ---
- (Class)cellClass {
    NSAssert(NO, @"must impl cellClass");
    return [KJTableViewCell class];
}

- (NSString *)cellID {
    NSAssert(NO, @"must impl cellID");
    return kKJTableViewItem_cellID;
}

@end
